<?php

return [
    'regex' => [ // 正则替换
        '/`This is a \$\{([a-zA-Z]+)\} variable\.`/s' => '`这是一个 ${$1} 变量.`',
        '/______/s' => '______',
        '/______/s' => '______',
    ],
    [ // 模板字符
        '`This is a ${a} variable.`' => '`这是一个 ${a} 变量.`',
        '______' => '______',
        '______' => '______',
    ],
    [ // 模板字符
        "`This is a \${a} variable.`" => "`这是一个 \${a} 变量.`",
        "______" => "______",
        "______" => "______",
    ],
    [ // 其他字符
        'title:"Name"' => 'title:"名称"',
        '______' => '______',
        '______' => '______',
    ],
    [ // 其他字符
        "title:'Name'" => "title:'名称'",
        "______" => "______",
        "______" => "______",
    ],
    [ // 单引号字符
        "'This is a variable.'" => "'这是一个变量.'",
        "'______'" => "'______'",
        "'______'" => "'______'",
    ],
    [ // 双引号字符
        '"This is a variable."' => '"这是一个变量."',
        '"______"' => '"______"',
        '"______"' => '"______"',
    ],
    // 后面的全是 [双引号字符]
    // ...
];

# 变量替换
// ([a-zA-Z]+)
// ([a-zA-Z_\.]+)
// ([a-zA-Z\d_\.]+)
// ([\da-zA-Z_\(\)\[\]\.]+)
// ([\da-zA-Z_\(\)\[\]\.,"]+)
// ([\da-zA-Z_\(\)\[\]\.,"\|]+)
// ([\da-zA-Z_\(\)\-\+\[\]\.,":&\|\s\?<>=]+)

// ({collection:"集合",folder:"文件夹"})
// ({collection:"集合",environment:"环境"})
// ({collection:"集合",folder:"文件夹",request:"请求"})
// ({collection:"集合","environment":"环境",globals:"全局"})
// ({collection:"集合","mock server":"模拟服务器",environment:"环境"})
// ({globals:"全局",collection:"集合",environment:"环境",folder:"文件夹",request:"请求"})

// '"(.*)"' => '"(.*)"'

// ([A-Za-z]+)([\u4e00-\u9fa5]+) $1 $2
// ([\u4e00-\u9fa5]+)([A-Za-z]+) $1 $2
// (,)([\u4e00-\u9fa5]+) $1 $2

// '`([A-Za-z\s,\\']+)?\$\{([\da-zA-Z_\(\)\-\+\[\]\.,":&\|\s]+)\}([A-Za-z\s,\\']+)?`' => '`(.*)?\$\{([\da-zA-Z_\(\)\-\+\[\]\.,":&\|\s]+)\}(.*)?`',
// '/`$1\\\$\\{([\\da-zA-Z_\\(\\)\\-\\+\\[\\]\\.,":&\\|\\s]+)\\}$3`/s' => '`$4\${\$1}$6`',